package net.xdclass.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.xdclass.enums.BizCodeEnum;
import net.xdclass.exception.BizException;
import net.xdclass.service.AddressService;
import net.xdclass.utils.JsonData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.oas.annotations.EnableOpenApi;

/**
 * <p>
 * 电商-公司收发货地址表 前端控制器
 * </p>
 *
 * @author wzb
 * @since 2025-09-03
 */
@RestController
@RequestMapping("/api/v1/address")
@Api(tags = "收货地址模块")
public class AddressController {

    @Autowired
    private AddressService addressService;

    @RequestMapping("/findById/{id}")
    @ApiOperation("通过id查询地址")
    public JsonData findById(@PathVariable("id") Long id){
        return JsonData.buildSuccess(addressService.findById(id));
    }

}

